package com.woniuxy.email.listener;

import com.rabbitmq.client.Channel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageProperties;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.io.IOException;

/**
 * @author yellow Docter
 * @date 2024-10-24
 * @desc 蜗牛创想：www.woniuxy.com
 */
@Component
@Slf4j
public class DeadListener {

    /**
     *
     * @param text        消息数据
     */
    @RabbitListener(queues = "dlx.queue")
    public void handler(String text) throws IOException {
        System.out.println("我是死信消费者进行消费 = " + text);
    }
}
